import { createApp } from 'vue'
import router from './router'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Icon from '@/components/Icon.vue'
import '@/router/permission'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// eslint-disable-next-line vue/component-definition-name-casing
app.component('Icon', Icon)

app.use(createPinia())
app.use(ElementPlus)
app.use(router)

app.mount('#app')
